package org.dizena;

import com.baomidou.mybatisplus.autoconfigure.MybatisPlusAutoConfiguration;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

/**
 * @author WuXin
 * @Date: 2021-11-11 13:17
 */
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class, MybatisPlusAutoConfiguration.class})
public class StartApp {
    public static void main(String[] args) {
        SpringApplication.run(StartApp.class, args);
    }

    @Bean
    public CommandLineRunner demo() {
        return args -> {
            Thread.sleep(1000);
            RestTemplate req = new RestTemplate();
            String s = req.getForObject("http://127.0.0.1:56789/1", String.class);
            System.out.println(s);
        };
    }

}
